package cn.highedu.service.impl;

import cn.highedu.service.IUserService;
import org.springframework.stereotype.Service;
import org.springframework.validation.annotation.Validated;

import javax.validation.constraints.*;

@Service
@Validated
public class UserServiceImpl {
    public void createUser(@NotNull(message = "用户名不能为空") String username,
                           @Size(min = 6, max = 16, message = "密码长度必须为6-16位") String password,
                           @Email(message = "邮箱格式不正确") String email,
                           @NotEmpty(message = "手机号不能为空") String phone,
                           @NotBlank(message = "地址不能为空") String address) {

    }
}
